Skip to content

fix: resolve unit pathfinding vibration around buildings#1064

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-unit-pathfinding-O1rKT
Jan 27, 2026
Merged

fix: resolve unit pathfinding vibration around buildings#1064
braedonsaunders merged 1 commit into
mainfrom
claude/fix-unit-pathfinding-O1rKT

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

Root cause: dual pathfinding system conflict where building avoidance steering forces were applied on top of crowd navigation velocities, causing oscillation at building corners.

SC2-style architecture changes:

  • Remove building avoidance forces for crowd-navigated ground units (navmesh TileCache already routes around buildings)
  • Keep building avoidance only for flying units and fallback paths
  • Simplify hard collision resolution (remove push buffer that caused ping-pong oscillation)
  • Increase navmesh walkable radius (0.6 -> 0.8) for better clearance
  • Add priority-based push-through (moving units push idle units)
  • Update collision config with wider margins and gentler stuck detection

Key insight: SC2 separates concerns - navmesh handles buildings, boids handle unit-to-unit spacing. Mixing them causes conflicts.

https://claude.ai/code/session_01WMrGYxn1NPTPcGn9XCykRh

Root cause: dual pathfinding system conflict where building avoidance
steering forces were applied on top of crowd navigation velocities,
causing oscillation at building corners.

SC2-style architecture changes:
- Remove building avoidance forces for crowd-navigated ground units
  (navmesh TileCache already routes around buildings)
- Keep building avoidance only for flying units and fallback paths
- Simplify hard collision resolution (remove push buffer that caused
  ping-pong oscillation)
- Increase navmesh walkable radius (0.6 -> 0.8) for better clearance
- Add priority-based push-through (moving units push idle units)
- Update collision config with wider margins and gentler stuck detection

Key insight: SC2 separates concerns - navmesh handles buildings,
boids handle unit-to-unit spacing. Mixing them causes conflicts.

https://claude.ai/code/session_01WMrGYxn1NPTPcGn9XCykRh
@braedonsaunders braedonsaunders merged commit 5709393 into main Jan 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants